package com.castle.fortress.admin.cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.cms.dto.CmsCustTagDto;
import com.castle.fortress.admin.cms.entity.CmsCustTagEntity;
import com.castle.fortress.common.entity.RespBody;

import java.util.List;
import java.util.Map;

/**
 * cms用户自定义标签表 服务类
 *
 * @author castle
 * @since 2022-03-02
 */
public interface CmsCustTagService extends IService<CmsCustTagEntity> {

    /**
     * 分页展示cms用户自定义标签表列表
     * @param page
     * @param cmsCustTagDto
     * @return
     */
    IPage<CmsCustTagDto> pageCmsCustTag(Page<CmsCustTagDto> page, CmsCustTagDto cmsCustTagDto);


    /**
     * 展示cms用户自定义标签表列表
     * @param cmsCustTagDto
     * @return
     */
    List<CmsCustTagDto> listCmsCustTag(CmsCustTagDto cmsCustTagDto);

    /**
     * 检查字段是否重复
     * @param dto
     * @return
     */
    RespBody checkColumnRepeat(CmsCustTagDto dto);

    /**
     * 查询文章绑定的标签
     * @param articleId
     * @return
     */
    List<CmsCustTagDto> listByArticle(Long articleId);

    /**
     * 用于cms标签
     * @param map
     * @return
     */
    List<CmsCustTagDto> cmsTagListCmsTag(Map<String, Object> map);
}
